
function User() {}
User.prototype.name = function() {
  console.log("user.name");
};


function Admin() {}
Admin.prototype = Object.create(User.prototype);
// Admin.prototype.constructor = Admin;
Object.defineProperty(Admin.prototype, "constructor", {
  value: Admin,
  // enumerable: false
});
Admin.prototype.role = function() {
  console.log("admin.role");
};



let a = new Admin();
a.role();
console.log(a.constructor)

for(var i in a ) {
	console.log(i + " : " + a[i])
}

console.log('--------------------------------------------\n')
